<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('审核本级回复M-信件')"/>
</head>
<body style="background-color: #F4F6FA">
<div>
    <div class="tabs-container">
        <ul class="nav nav-tabs" style="background-color: white;position: relative">
            <li class="active"><a data-toggle="tab" th:href="@{'/system/mMailWF/cmnFile/getPeerReplyOverUntreatedM'}" aria-expanded="true">获取处理</a></li>
            <li><a data-toggle="tab" th:href="@{'/system/mMailWF/cmnFile/peerReplyOverUntreatedM'}" aria-expanded="true">未处理</a></li>
            <li><a data-toggle="tab" th:href="@{'/system/mMailWF/cmnFile/peerReplyOverTreatedM'}" aria-expanded="false" title="本部门已办毕工单M">已处理</a>
            </li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active">
                <iframe id="navFrame" width="100%" scrolling="no" th:src="@{'/system/mMailWF/cmnFile/getPeerReplyOverUntreatedM'}" frameborder="0" seamless></iframe>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script>
    $("#navFrame").on("load", loadIframe);

    $(document).ready(function () {
        $(".nav-tabs li>a").click(function (e) {
            if ($(this).attr("href").length && this.parentNode.className.indexOf('active') == -1) {
                e.preventDefault();
                $(this).parent('li').addClass('active').siblings().removeClass('active');
                loadIframe();
                $("#navFrame").attr("src", $(this).attr("href"));
            }
        })
    });

    function loadIframe() {//iframe加载完后 高度自适应。
        $("#navFrame").height(0);
        var navFrame = document.getElementById("navFrame").contentDocument || document.getElementById("navFrame").contentWindow.document,
            mainWrapHeight = $(window).height() - 49 - 21,
            frame_height = navFrame.documentElement.scrollHeight;
        $("#navFrame").height(frame_height < 589 ? mainWrapHeight : frame_height + 20);
    }
</script>
</body>
</html>